package com.bolehui.web;

import com.bolehui.base.result.Result;
import com.bolehui.service.AreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author chendongjie     email:chendongjie@gz.iscas.ac.cn
 * @version 1.0
 * @ClassName AreaController
 * @Description
 * @createTime 2024/12/18 10:21
 * Copyright (C) 2021-2022 CASEEDER, All Rights Reserved.
 * 注意：本内容仅限于内部传阅，禁止外泄以及用于其他的商业目的
 */
@RequestMapping("/area")
@RestController
public class AreaController {

    @Autowired
    private AreaService areaService;

    @RequestMapping(params = "action=getAreaList")
    public Result getAreaList(){
        return areaService.getAreaList();
    }

    @RequestMapping(params = "action=getAreaByCode")
    public Result getAreaByCode(String areaCode){
        return areaService.getAreaByCode(areaCode);
    }

    @RequestMapping(params = "action=getCodeByLabel")
    public Result getCode(String areaName){
        return areaService.getCodeByAreaName(areaName);
    }
}
